<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //生成一个n~m之间的随机数
        // Math.floor(Math.random() * (m - n + 1)) + n
        //生成一个15~20之间的随机数
        console.log( Math.floor(Math.random() * (20 - 15 + 1)) + 15);
    </script>
</body>

</html>